<?php

use think\migration\Seeder;

class BasicEpaPeopleData extends Seeder
{
    /**
     * 基本信息 - 环保局人员
     */
    public function run()
    {
        $faker = new \Faker\Generator();
        $faker->addProvider(new \Faker\Provider\zh_CN\Person($faker));
        $faker->addProvider(new \Faker\Provider\zh_CN\PhoneNumber($faker));

        $table = $this->table('basic_epa_people');
        $rows = [];
        for ($i = 1; $i < 100; $i++) {
            $rows[] = [
                'username' => $faker->name,
                'mobile' => $faker->phoneNumber,
                'create_time' => time()
            ];
        }
        $table->insert($rows)->save();
    }
}